<?php

declare(strict_types=1);
/**
 * This file is part of habo_new_media.
 *
 * @link     https://www.berlen.cn/
 * @contact  tech@berlen.cn
 * @license  http://gitlab.rehou.cn/habo/habo_new_media/-/blob/master/README.md
 */
namespace app\service\material\base;

use app\model\PicModel;
use app\model\VideoModel;

trait TaskTrait
{
    /**
     * 是否是任务.
     *
     * @param PicModel|VideoModel $model 视频模型
     */
    protected static function isTask($model): bool
    {
        return intval($model->getAttr('task_id')) > 0;
    }
}
